<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>PaperScript</title>
<base target="class-frame">
<link href="../assets/css/docs.css" rel="stylesheet" type="text/css">
<script src="../assets/js/paper.js"></script>
<script src="../assets/js/jquery.js"></script>
<script src="../assets/js/codemirror.js"></script>
<script src="../assets/js/docs.js"></script>
</head>
<body class="reference">
<div class="reference-class">
<h1>PaperScript</h1>



</div>








	<div class="reference-members"><h2>Static Methods</h2>
		
			
<div id="compile-code" class="member">
<div class="member-link">
<a name="compile-code" href="#compile-code"><tt><b>PaperScript.compile</b>(code)</tt></a>
</div>
<div class="member-description hidden">
<div class="member-text">
	<p>Compiles PaperScript code into JavaScript code.</p>
	
<ul><b>Parameters:</b>

<li>
<tt>code:</tt> 
<tt>String</tt>
&mdash;&nbsp;The PaperScript code

</li>

</ul>

	
	<ul><b>Returns:</b>
	
		<li>
<tt><tt>String</tt></tt>&nbsp;&mdash;&nbsp;the compiled PaperScript as JavaScript code
</li>
	
	</ul>

	
	
</div>
</div>
</div>
		
			
<div id="execute-code-scope" class="member">
<div class="member-link">
<a name="execute-code-scope" href="#execute-code-scope"><tt><b>PaperScript.execute</b>(code, scope)</tt></a>
</div>
<div class="member-description hidden">
<div class="member-text">
	<p>Executes the parsed PaperScript code in a compiled function that receives
all properties of the passed <a href="../classes/PaperScope.html"><tt>PaperScope</tt></a> as arguments, to emulate
a global scope with unaffected performance. It also installs global view
and tool handlers automatically for you.</p>
	
<ul><b>Parameters:</b>

<li>
<tt>code:</tt> 
<tt>String</tt>
&mdash;&nbsp;The PaperScript code

</li>

<li>
<tt>scope:</tt> 
<a href="../classes/PaperScript.html"><tt>PaperScript</tt></a>
&mdash;&nbsp;The scope for which the code is executed

</li>

</ul>

	
	
	
</div>
</div>
</div>
		
	</div>



<!-- =========================== copyright notice ========================= -->
<p class="footer">Copyright &#169; 2011 <a href="http://www.lehni.org" target="_blank">J&uuml;rg Lehni</a> &amp; <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
<div class="content-end"></div>

</body>